package com.example.demo.service;

import com.example.demo.entity.Userinfo;
import com.example.demo.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.xml.ws.Action;

/**
 * @Author :蕉绿
 * @Date : 2023/3/14 19:28
 * @Version : V1.0
 * @Description :
 */
@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public int reg(Userinfo userinfo) {
        return userMapper.reg(userinfo);
    }

    public Userinfo getUserByName(String username) {
        return userMapper.getByUsername(username);
    }

    public Userinfo getUserById(Integer id) {
        return userMapper.getUserById(id);
    }


}
